﻿#include <cstdio>
#include <iostream>
#include "../../headers/fuminux_mice.h"
#include "../../headers/fuminux_keyboard.h"
using namespace std;
int main()
{
    int f = fork();
    if (f < 0) {
        cout << "failed." << endl;
        exit(-1);
    }
    else if (f == 0) {
        
    }
    else if (f > 0) {
        mice();
        keyboard();
        swapper_server();
        while (true) {
            usleep(1000 * 10);
            printf("%d %d %d %d \n", fi.mice_click, fi.mice_move_x, fi.mice_move_y, fi.keyboard_input);
        }
        exit(0);
    }
    return 0;
}